package com.huimingpay.transaction.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName refund_order
 */
@TableName(value ="refund_order")
public class RefundOrder implements Serializable {
    /**
     * 
     */
    @TableId
    private Long id;

    /**
     * 聚合支付退款订单号
     */
    private String refundNo;

    /**
     * 聚合支付订单号
     */
    private String tradeNo;

    /**
     * 所属商户
     */
    private Long merchantId;

    /**
     * 所属应用
     */
    private String appId;

    /**
     * 原始支付渠道编码
     */
    private String payChannel;

    /**
     * 原始渠道商户id
     */
    private String payChannelMchId;

    /**
     * 原始渠道订单号
     */
    private String payChannelTradeNo;

    /**
     * 原始渠道退款订单号
     */
    private String payChannelRefundNo;

    /**
     * 聚合支付的渠道
     */
    private String channel;

    /**
     * 商户订单号
     */
    private String outTradeNo;

    /**
     * 商户退款订单号
     */
    private String outRefundNo;

    /**
     * 原始渠道用户标识,如微信openId,支付宝账号
     */
    private String payChannelUser;

    /**
     * 原始渠道用户姓名
     */
    private String payChannelUsername;

    /**
     * 币种CNY
     */
    private String currency;

    /**
     * 订单总金额，单位为分
     */
    private Integer totalAmount;

    /**
     * 退款金额,单位分
     */
    private Integer refundAmount;

    /**
     * 用户自定义的参数,商户自定义数据
     */
    private String optional;

    /**
     * 用于统计分析的数据,用户自定义
     */
    private String analysis;

    /**
     * 特定渠道发起时额外参数
     */
    private String extra;

    /**
     * 退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成
     */
    private String refundState;

    /**
     * 退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败
     */
    private String refundResult;

    /**
     * 渠道支付错误码
     */
    private String errorCode;

    /**
     * 渠道支付错误信息
     */
    private String errorMsg;

    /**
     * 设备
     */
    private String device;

    /**
     * 客户端IP
     */
    private String clientIp;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 订单过期时间
     */
    private Date expireTime;

    /**
     * 退款成功时间
     */
    private Date refundSuccessTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 聚合支付退款订单号
     */
    public String getRefundNo() {
        return refundNo;
    }

    /**
     * 聚合支付退款订单号
     */
    public void setRefundNo(String refundNo) {
        this.refundNo = refundNo;
    }

    /**
     * 聚合支付订单号
     */
    public String getTradeNo() {
        return tradeNo;
    }

    /**
     * 聚合支付订单号
     */
    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    /**
     * 所属商户
     */
    public Long getMerchantId() {
        return merchantId;
    }

    /**
     * 所属商户
     */
    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    /**
     * 所属应用
     */
    public String getAppId() {
        return appId;
    }

    /**
     * 所属应用
     */
    public void setAppId(String appId) {
        this.appId = appId;
    }

    /**
     * 原始支付渠道编码
     */
    public String getPayChannel() {
        return payChannel;
    }

    /**
     * 原始支付渠道编码
     */
    public void setPayChannel(String payChannel) {
        this.payChannel = payChannel;
    }

    /**
     * 原始渠道商户id
     */
    public String getPayChannelMchId() {
        return payChannelMchId;
    }

    /**
     * 原始渠道商户id
     */
    public void setPayChannelMchId(String payChannelMchId) {
        this.payChannelMchId = payChannelMchId;
    }

    /**
     * 原始渠道订单号
     */
    public String getPayChannelTradeNo() {
        return payChannelTradeNo;
    }

    /**
     * 原始渠道订单号
     */
    public void setPayChannelTradeNo(String payChannelTradeNo) {
        this.payChannelTradeNo = payChannelTradeNo;
    }

    /**
     * 原始渠道退款订单号
     */
    public String getPayChannelRefundNo() {
        return payChannelRefundNo;
    }

    /**
     * 原始渠道退款订单号
     */
    public void setPayChannelRefundNo(String payChannelRefundNo) {
        this.payChannelRefundNo = payChannelRefundNo;
    }

    /**
     * 聚合支付的渠道
     */
    public String getChannel() {
        return channel;
    }

    /**
     * 聚合支付的渠道
     */
    public void setChannel(String channel) {
        this.channel = channel;
    }

    /**
     * 商户订单号
     */
    public String getOutTradeNo() {
        return outTradeNo;
    }

    /**
     * 商户订单号
     */
    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    /**
     * 商户退款订单号
     */
    public String getOutRefundNo() {
        return outRefundNo;
    }

    /**
     * 商户退款订单号
     */
    public void setOutRefundNo(String outRefundNo) {
        this.outRefundNo = outRefundNo;
    }

    /**
     * 原始渠道用户标识,如微信openId,支付宝账号
     */
    public String getPayChannelUser() {
        return payChannelUser;
    }

    /**
     * 原始渠道用户标识,如微信openId,支付宝账号
     */
    public void setPayChannelUser(String payChannelUser) {
        this.payChannelUser = payChannelUser;
    }

    /**
     * 原始渠道用户姓名
     */
    public String getPayChannelUsername() {
        return payChannelUsername;
    }

    /**
     * 原始渠道用户姓名
     */
    public void setPayChannelUsername(String payChannelUsername) {
        this.payChannelUsername = payChannelUsername;
    }

    /**
     * 币种CNY
     */
    public String getCurrency() {
        return currency;
    }

    /**
     * 币种CNY
     */
    public void setCurrency(String currency) {
        this.currency = currency;
    }

    /**
     * 订单总金额，单位为分
     */
    public Integer getTotalAmount() {
        return totalAmount;
    }

    /**
     * 订单总金额，单位为分
     */
    public void setTotalAmount(Integer totalAmount) {
        this.totalAmount = totalAmount;
    }

    /**
     * 退款金额,单位分
     */
    public Integer getRefundAmount() {
        return refundAmount;
    }

    /**
     * 退款金额,单位分
     */
    public void setRefundAmount(Integer refundAmount) {
        this.refundAmount = refundAmount;
    }

    /**
     * 用户自定义的参数,商户自定义数据
     */
    public String getOptional() {
        return optional;
    }

    /**
     * 用户自定义的参数,商户自定义数据
     */
    public void setOptional(String optional) {
        this.optional = optional;
    }

    /**
     * 用于统计分析的数据,用户自定义
     */
    public String getAnalysis() {
        return analysis;
    }

    /**
     * 用于统计分析的数据,用户自定义
     */
    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    /**
     * 特定渠道发起时额外参数
     */
    public String getExtra() {
        return extra;
    }

    /**
     * 特定渠道发起时额外参数
     */
    public void setExtra(String extra) {
        this.extra = extra;
    }

    /**
     * 退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成
     */
    public String getRefundState() {
        return refundState;
    }

    /**
     * 退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成
     */
    public void setRefundState(String refundState) {
        this.refundState = refundState;
    }

    /**
     * 退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败
     */
    public String getRefundResult() {
        return refundResult;
    }

    /**
     * 退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败
     */
    public void setRefundResult(String refundResult) {
        this.refundResult = refundResult;
    }

    /**
     * 渠道支付错误码
     */
    public String getErrorCode() {
        return errorCode;
    }

    /**
     * 渠道支付错误码
     */
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    /**
     * 渠道支付错误信息
     */
    public String getErrorMsg() {
        return errorMsg;
    }

    /**
     * 渠道支付错误信息
     */
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    /**
     * 设备
     */
    public String getDevice() {
        return device;
    }

    /**
     * 设备
     */
    public void setDevice(String device) {
        this.device = device;
    }

    /**
     * 客户端IP
     */
    public String getClientIp() {
        return clientIp;
    }

    /**
     * 客户端IP
     */
    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 订单过期时间
     */
    public Date getExpireTime() {
        return expireTime;
    }

    /**
     * 订单过期时间
     */
    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    /**
     * 退款成功时间
     */
    public Date getRefundSuccessTime() {
        return refundSuccessTime;
    }

    /**
     * 退款成功时间
     */
    public void setRefundSuccessTime(Date refundSuccessTime) {
        this.refundSuccessTime = refundSuccessTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RefundOrder other = (RefundOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRefundNo() == null ? other.getRefundNo() == null : this.getRefundNo().equals(other.getRefundNo()))
            && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getPayChannel() == null ? other.getPayChannel() == null : this.getPayChannel().equals(other.getPayChannel()))
            && (this.getPayChannelMchId() == null ? other.getPayChannelMchId() == null : this.getPayChannelMchId().equals(other.getPayChannelMchId()))
            && (this.getPayChannelTradeNo() == null ? other.getPayChannelTradeNo() == null : this.getPayChannelTradeNo().equals(other.getPayChannelTradeNo()))
            && (this.getPayChannelRefundNo() == null ? other.getPayChannelRefundNo() == null : this.getPayChannelRefundNo().equals(other.getPayChannelRefundNo()))
            && (this.getChannel() == null ? other.getChannel() == null : this.getChannel().equals(other.getChannel()))
            && (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo()))
            && (this.getOutRefundNo() == null ? other.getOutRefundNo() == null : this.getOutRefundNo().equals(other.getOutRefundNo()))
            && (this.getPayChannelUser() == null ? other.getPayChannelUser() == null : this.getPayChannelUser().equals(other.getPayChannelUser()))
            && (this.getPayChannelUsername() == null ? other.getPayChannelUsername() == null : this.getPayChannelUsername().equals(other.getPayChannelUsername()))
            && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
            && (this.getRefundAmount() == null ? other.getRefundAmount() == null : this.getRefundAmount().equals(other.getRefundAmount()))
            && (this.getOptional() == null ? other.getOptional() == null : this.getOptional().equals(other.getOptional()))
            && (this.getAnalysis() == null ? other.getAnalysis() == null : this.getAnalysis().equals(other.getAnalysis()))
            && (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra()))
            && (this.getRefundState() == null ? other.getRefundState() == null : this.getRefundState().equals(other.getRefundState()))
            && (this.getRefundResult() == null ? other.getRefundResult() == null : this.getRefundResult().equals(other.getRefundResult()))
            && (this.getErrorCode() == null ? other.getErrorCode() == null : this.getErrorCode().equals(other.getErrorCode()))
            && (this.getErrorMsg() == null ? other.getErrorMsg() == null : this.getErrorMsg().equals(other.getErrorMsg()))
            && (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice()))
            && (this.getClientIp() == null ? other.getClientIp() == null : this.getClientIp().equals(other.getClientIp()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
            && (this.getRefundSuccessTime() == null ? other.getRefundSuccessTime() == null : this.getRefundSuccessTime().equals(other.getRefundSuccessTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRefundNo() == null) ? 0 : getRefundNo().hashCode());
        result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getPayChannel() == null) ? 0 : getPayChannel().hashCode());
        result = prime * result + ((getPayChannelMchId() == null) ? 0 : getPayChannelMchId().hashCode());
        result = prime * result + ((getPayChannelTradeNo() == null) ? 0 : getPayChannelTradeNo().hashCode());
        result = prime * result + ((getPayChannelRefundNo() == null) ? 0 : getPayChannelRefundNo().hashCode());
        result = prime * result + ((getChannel() == null) ? 0 : getChannel().hashCode());
        result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
        result = prime * result + ((getOutRefundNo() == null) ? 0 : getOutRefundNo().hashCode());
        result = prime * result + ((getPayChannelUser() == null) ? 0 : getPayChannelUser().hashCode());
        result = prime * result + ((getPayChannelUsername() == null) ? 0 : getPayChannelUsername().hashCode());
        result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
        result = prime * result + ((getRefundAmount() == null) ? 0 : getRefundAmount().hashCode());
        result = prime * result + ((getOptional() == null) ? 0 : getOptional().hashCode());
        result = prime * result + ((getAnalysis() == null) ? 0 : getAnalysis().hashCode());
        result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode());
        result = prime * result + ((getRefundState() == null) ? 0 : getRefundState().hashCode());
        result = prime * result + ((getRefundResult() == null) ? 0 : getRefundResult().hashCode());
        result = prime * result + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode());
        result = prime * result + ((getErrorMsg() == null) ? 0 : getErrorMsg().hashCode());
        result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode());
        result = prime * result + ((getClientIp() == null) ? 0 : getClientIp().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
        result = prime * result + ((getRefundSuccessTime() == null) ? 0 : getRefundSuccessTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", refundNo=").append(refundNo);
        sb.append(", tradeNo=").append(tradeNo);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", appId=").append(appId);
        sb.append(", payChannel=").append(payChannel);
        sb.append(", payChannelMchId=").append(payChannelMchId);
        sb.append(", payChannelTradeNo=").append(payChannelTradeNo);
        sb.append(", payChannelRefundNo=").append(payChannelRefundNo);
        sb.append(", channel=").append(channel);
        sb.append(", outTradeNo=").append(outTradeNo);
        sb.append(", outRefundNo=").append(outRefundNo);
        sb.append(", payChannelUser=").append(payChannelUser);
        sb.append(", payChannelUsername=").append(payChannelUsername);
        sb.append(", currency=").append(currency);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", refundAmount=").append(refundAmount);
        sb.append(", optional=").append(optional);
        sb.append(", analysis=").append(analysis);
        sb.append(", extra=").append(extra);
        sb.append(", refundState=").append(refundState);
        sb.append(", refundResult=").append(refundResult);
        sb.append(", errorCode=").append(errorCode);
        sb.append(", errorMsg=").append(errorMsg);
        sb.append(", device=").append(device);
        sb.append(", clientIp=").append(clientIp);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", expireTime=").append(expireTime);
        sb.append(", refundSuccessTime=").append(refundSuccessTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}